#include "Avalon/ServiceLocator/DirectoryEntry.hpp"
#include "Avalon/Serialization/DataShuttle.hpp"

using namespace Avalon;
using namespace Avalon::ServiceLocator;
using namespace Avalon::Serialization;
using namespace boost;
using namespace std;

DirectoryEntry::Tag::Tag()
    : m_id(-1) {}

DirectoryEntry::Tag::Tag(Type type, unsigned int id, const string& name)
    : m_type(type),
      m_id(id),
      m_name(name) {}

bool DirectoryEntry::Tag::operator <(const Tag& rhs) const {
  return m_id < rhs.m_id;
}

bool DirectoryEntry::Tag::operator ==(const Tag& rhs) const {
  return m_id == rhs.m_id;
}

void DirectoryEntry::Tag::Shuttle(DataShuttle* shuttle, unsigned int version) {
  shuttle->Shuttle("type", m_type);
  shuttle->Shuttle("id", m_id);
  shuttle->Shuttle("name", m_name);
}

DirectoryEntry::~DirectoryEntry() {}
